﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace ReallyReallyReallySimpleRoguelike.Entities
{
    public class Sword : Tile
    {
        private int uses;
        private int maxUses;

        public Sword(Point p)
        {
            ImageCharacter = Constants.SwordImage;
            this.Color = Constants.SwordColor;
            X = p.X;
            Y = p.Y;
            maxUses = 3;
        }

        public void Use(Player p)
        {
            uses++;

            if (uses >= maxUses)
                p.Inventory.Remove(this);
            
        }

        public int UsesRemaining
        {
            get { return maxUses-uses ; }
        }
    }
}
